home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************\
-
- File: Four corner wipe.c
-
- Purpose: This module handles clearing the screen in a funky
- manner. See the comments below for more details.
-
-
- Shutdown FX -=- graphic effects on shutdown
- Copyright (C) 1993 Mark Pilgrim & Dave Blumenthal
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program in a file named "GNU General Public License".
- If not, write to the Free Software Foundation, 675 Mass Ave,
- Cambridge, MA 02139, USA.
-
- \**********************************************************************/
-
- #include "msg timing.h"
-
- #define VBarGap 5
- #define HBarGap (VBarGap*height/width)
- #define CorrectTime 1
-
- void FourCorner(Pattern *thePattern, int width, int height);
-
- /* Take 4 bars, two on each axis, and move them towards different corners.
- This means lots of overlap copying, but the timing masks it and Quickdraw
- may even take care of some of it. (?) */
-
- void FourCorner(Pattern *thePattern, int width, int height)
- {
- Rect vsource1,hsource1,vsource2,hsource2;
- int vbar,hbar,cx,cy;
-
- vbar=VBarGap;
- hbar=HBarGap;
- cx = width/2;
- cy = height/2;
- vsource1.top=vsource2.top=hsource2.left=hsource1.left=0; /* these */
- vsource1.bottom=vsource2.bottom=height; /* never */
- hsource1.right=hsource2.right=width; /* change */
-
- while (vbar<cx+VBarGap)
- {
- StartTiming();
- vsource1.left=cx-vbar;
- vsource1.right=vsource1.left+VBarGap;
- vsource2.right=cx+vbar;
- vsource2.left=vsource2.right-VBarGap;
- hsource1.top=cy-hbar;
- hsource1.bottom=hsource1.top+HBarGap;
- hsource2.bottom=cy+hbar;
- hsource2.top=hsource2.bottom-HBarGap;
- FillRect(&vsource1, *thePattern);
- FillRect(&hsource1, *thePattern);
- FillRect(&vsource2, *thePattern);
- FillRect(&hsource2, *thePattern);
- vbar+=VBarGap;
- hbar+=HBarGap;
- TimeCorrection(CorrectTime);
- }
- }
-